//
//  PreparationsCatalogue.m
//  wedding
//
//  Created by 常宽 on 15/1/14.
//  Copyright (c) 2015年 常宽. All rights reserved.
//

#define HEIGHT self.frame.size.height
#define WIDTH self.frame.size.width

#import "PreparationsCatalogue.h"

@interface PreparationsCatalogue ()

@end

@implementation PreparationsCatalogue

- (instancetype) initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.tuBiao = [[UIImageView alloc] init];
        [self addSubview:self.tuBiao];
        
        self.title = [[UILabel alloc] init];
        [self addSubview:self.title];
    }
    return self;
}

- (void) layoutSubviews
{
    [super layoutSubviews];
    self.tuBiao.frame = CGRectMake(WIDTH * 0.15f, WIDTH * 0.15f * 0.5, WIDTH * 0.7f, WIDTH * 0.7f);
    
    self.title.frame = CGRectMake(0, WIDTH * (0.7 + 0.15f * 0.5)+2, WIDTH, WIDTH * 0.17);
    self.title.textAlignment = NSTextAlignmentCenter;
    self.title.textColor = [[WebColor white]colorWithAlphaComponent:.9f];
    self.title.font = [UIFont boldSystemFontOfSize:self.title.frame.size.height * 0.7f];
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
